package Euler1;

public class Multiples {

	public static void main(String[] args) 
	{
		System.out.println(isMultiple(7, new int[]{3,5}));
		
		long sum = 0;
		int[] multiples = new int[]{3,5};
		
		for(int i = 1; i < 1000; i++)
		{
			if(isMultiple(i, multiples)) 
			{
				sum += i;
			}
		}
		
		System.out.println("The sum is: " + sum);
	}
	
	
	public static boolean isMultiple(int num, int[] multiples)
	{
		for(int i = 0; i < multiples.length; i++)
		{
			if(num % multiples[i] == 0)
			{
				return true;
			}
		}
		
		return false;
	}
}
